<?php include('CSRE_login_control.php') ?>

<?php 
if (isset($_SESSION["products"])) {
	$total = 0;
	$keys = array_keys($_SESSION["products"]);
	
	foreach ($keys as $key) {
		$total = $total + $_SESSION["products"][$key]['units'];
	}
	
	if ($total > 0) {
		echo "Produits ajoutee: " . $total;
	} else {
		echo "Vide panier";
	}
} else {
	echo "Vide panier";
}
?>